<%@ include file="/WEB-INF/tiles/include.jsp"%>

<script type="text/javascript">
	
	$(document).ready(function($) {
		$("#modalbox_save").click(function() {
			$.wis.util.doSave();
		});
	
		$("#facebox_close").click(function() {
			$.facebox.close();   
		});
	});

</script>

<form:form id="editForm" commandName="commandExchangeRate" method="post" action="${pageContext.request.contextPath}/basic/administrative/exchangeRate.save">
	<form:hidden path="pgIndex"/>
	<form:hidden path="pgRows"/>
	<form:hidden path="pgTotal"/>
	<form:hidden path="id"/>
	<form:hidden path="strAction"/>

<table class="tableInput">
	<tr>
		<th class="field"><spring:message code="label.currencySrc" />&nbsp;:</th>
		<td class="even"><form:hidden path="srcCurrId"/>
			<c:forEach items="${commandExchangeRate.currList}" var="currency" varStatus="currencySt">
				<c:if test="${commandExchangeRate.srcCurrId == currency.stValue}">
					${currency.stLabel}
				</c:if>
			</c:forEach>
		</td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.currencyDest" />&nbsp;:</th>
		<td class="odd"><form:hidden path="destCurrId"/>
			<c:forEach items="${commandExchangeRate.currList}" var="currency" varStatus="currencySt">
				<c:if test="${commandExchangeRate.destCurrId == currency.stValue}">
					${currency.stLabel}
				</c:if>
			</c:forEach>
		</td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.rate" />&nbsp;:</th>
		<td class="even"><form:input path="rate" size="16" maxlength="16"/></td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.commission" />&nbsp;:</th>
		<td class="odd"><form:input path="commission" size="16" maxlength="16"/></td>
	</tr>
</table>
<table class="tableButton">
	<tr><td align="left">
		<span class="button"><a href="#modalbox_save" id="modalbox_save"><spring:message code="button.save"/></a></span>
		<span class="button"><a href="#facebox_close" id="facebox_close"><spring:message code="button.cancel"/></a></span>
	</td></tr>
</table>
</form:form>